home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / WINCALL.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.0 KB  |  49 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // FusionWindow
  8. //
  9.  
  10. #include "fliwin.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. #include <alloc.h>
  17.  
  18. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  19. //
  20. // CallWindow()
  21. //
  22. // Opens a new window and places it in queue
  23. //
  24. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  25.  
  26. void FusionWindow::CallWindow(int WindowToCall)
  27. {
  28.   if (WindowToCall==0 || NumberOfWindows==1)
  29.     return;
  30.  
  31.   Windows=(WindowElement**)realloc(Windows,(NumberOfWindows+1)*sizeof(WindowElement*));
  32.   Windows[0]->Active=0;
  33.   Windows[0]->ShowWindow();
  34.   Windows[0]->ShowInterior();
  35.  
  36.   for (register int i=NumberOfWindows-1;i>=0;i--)
  37.     Windows[i+1]=Windows[i];
  38.  
  39.   Windows[0]=Windows[WindowToCall+1];
  40.   Windows[0]->Active=1;
  41.  
  42.   for (i=WindowToCall+1;i<NumberOfWindows;i++)
  43.     Windows[i]=Windows[i+1];
  44.  
  45.   Windows[0]->ShowWindow();
  46.   Windows[0]->ShowInterior();
  47. }
  48.  
  49.